package com.jinlingxiu.app.other.db.dao

import androidx.room.*
import com.jinlingxiu.app.other.db.entity.AnswerBean

@Dao
interface AnswerDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertAnswers(vararg answerBean: AnswerBean)

    @Update
    suspend fun updateAnswers(vararg answerBean: AnswerBean)

    @Delete
    suspend fun deleteAnswers(vararg answerBean: AnswerBean)

    @Query("SELECT * FROM t_answer")
    suspend fun loadAllAnswers(): Array<AnswerBean>
}